package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.mapper.VehiclecomplaintsMapper;
import com.ktjiaoyu.pojo.Vehiclecomplaints;
import com.ktjiaoyu.service.VehiclecomplaintsService;
import com.ktjiaoyu.utils.RedisUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class VehiclecomplaintsServiceImpl implements VehiclecomplaintsService {
    @Resource
    VehiclecomplaintsMapper vehiclecomplaintsMapper;
    @Resource
    RedisUtil redisUtil;

    @Override
    public List<Vehiclecomplaints> selectAll(Long brandId) {
        return vehiclecomplaintsMapper.selectAll(brandId);
    }

    @Override
    @Transactional
    public int insert(Vehiclecomplaints vehiclecomplaints) {
        return vehiclecomplaintsMapper.insert(vehiclecomplaints);
    }

    @Override
    @Transactional
    public int update(Vehiclecomplaints vehiclecomplaints) {
        return vehiclecomplaintsMapper.update(vehiclecomplaints);
    }
}
